/**
 * 〈〉
 *
 * @author 王青杰
 * @create 2018-08-0810:25
 * @since 1.0.0
 */
package org.wlgzs.website.wlgzsoffice.controller.duty;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.wlgzs.website.wlgzsoffice.entity.TbAttendance;
import org.wlgzs.website.wlgzsoffice.entity.TbDuty;
import org.wlgzs.website.wlgzsoffice.service.DutyService;
import org.wlgzs.website.wlgzsoffice.util.ResultMsg;

import javax.annotation.Resource;

@Controller
@RequestMapping("duty/duty")
public class DutyController {
    @Resource
    DutyService dutyService;

    @RequestMapping(value = "/insert",method = RequestMethod.POST)
    public ResultMsg insert(TbDuty duty){
        return  dutyService.insert(duty);
    }

    @RequestMapping(value = "/delete",method = RequestMethod.POST)
    public ResultMsg delete(int dutyId){
        return dutyService.delete(dutyId);
    }

    @RequestMapping(value = "/update",method = RequestMethod.POST)
    public ResultMsg update(TbDuty duty){
        return  dutyService.update(duty);
    }

    @RequestMapping(value = "/checkAll",method = RequestMethod.POST)
    public ResultMsg checkAll(int pageNum,TbDuty duty){
        return dutyService.checkAll(pageNum,duty);
    }

}
